package com.atguigu.jucdemo.cas;

import java.util.concurrent.atomic.AtomicInteger;

public class CasHello {
    public static void main(String[] args) {
        AtomicInteger atomicInteger = new AtomicInteger(5);
        System.out.println(atomicInteger.get());
        System.out.println(atomicInteger.compareAndSet(5, 2025));
        System.out.println('\t');
        System.out.println(atomicInteger.get());
/*        System.out.println(atomicInteger.incrementAndGet());
        System.out.println(atomicInteger.getAndIncrement());
        System.out.println(atomicInteger.get());
        System.out.println("====================");
        System.out.println(atomicInteger.getAndAdd(3));
        System.out.println(atomicInteger.get());*/


    }
}
